package com.estore.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;

import com.estore.entity.Product;

public class ProductMapper implements RowMapper<Product> {

	@Override
	public Product mapRow(ResultSet rs, int arg1) throws SQLException {
		Product product = new Product();
		product.setProductID(rs.getInt("productID"));
		product.setBrandID(rs.getInt("brandID"));
		product.setCatID(rs.getInt("catID"));
		product.setProductName(rs.getString("productName"));
		product.setProductName(rs.getString("addDate"));
		return product;
	}
}
